package com.alibaba.datax.plugin.writer.dmwriter;

/**
 * 达梦Writer配置常量
 */
public class Key {

    // 必填配置项
    public static final String JDBC_URL = "jdbcUrl";
    public static final String USERNAME = "username";
    public static final String PASSWORD = "password";
    public static final String TABLE = "table";
    public static final String COLUMN = "column";

    public static final String WRITE_MODE = "writeMode";
    public static final String PRE_SQL = "preSql";
    public static final String POST_SQL = "postSql";
    public static final String SESSION = "session";

    // 默认值
    public static final int DEFAULT_BATCH_SIZE = 1024;
    public static final String DEFAULT_WRITE_MODE = "insert";

    // 达梦JDBC驱动类
    public static final String DM_JDBC_DRIVER = "dm.jdbc.driver.DmDriver";

    // 写入模式
    public static final String WRITE_MODE_INSERT = "insert";
    public static final String WRITE_MODE_REPLACE = "replace";
    public static final String WRITE_MODE_UPDATE = "update";

    public final static String DRYRUN = "dryRun";
    public final static String EMPTY_AS_NULL = "emptyAsNull";
    //默认值：256
    public final static String BATCH_SIZE = "batchSize";
    //默认值：32m
    public final static String BATCH_BYTE_SIZE = "batchByteSize";
    public final static String PRIMARY_KEYS = "primaryKeys";
}